<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/WEB-INF/struts-tags.tld" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<link id="favicon" href="/jxgl/favicon.ico" rel="icon" type="image/x-icon" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>学员个人主页</title>
<link rel="stylesheet" href="/jxgl/css/all.css" />
<link rel="stylesheet" href="/jxgl/css/login.css" />
<script type="text/javascript" src="/jxgl/js/jquery-1.8.0.min.js"></script>
<script type="text/javascript" src="/jxgl/js/jquery.validate.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
	$.validator.setDefaults({       
		submitHandler: function(form) {
			form.submit();
		}
	});
	jQuery.validator.addMethod("engCheck", function(value, element) {       
		return this.optional(element) || /^[\w]+$/.test(value);       
	}, "只能包括英文字母、数字和下划线");
	jQuery.validator.addMethod("byteRangeLength", function(value, element, param) {       
		var length = value.length;
		for(var i = 0; i < value.length; i++){       
			if(value.charCodeAt(i) > 127){       
			length++;
			}       
		}
		return this.optional(element) || ( length >= param[0] && length <= param[1] );       
	}, "请确保输入的值在3-15个字节之间(一个中文字算2个字节)");
	jQuery.validator.addMethod("isSameP", function(value, element) {
		return this.optional(element) || (value == $('#pwd').val());       
	}, "与密码不一致");
	$('#submitForm').validate({
		rules:{
			pwd:{
				required:true,
				engCheck:true,
				byteRangeLength:[5,10]
			},
			repassword:{
				required:true,
				isSameP:true
			}			
		},
		messages:{			
			pwd:{
				required:'请输入密码',
				engCheck:'英文字母,数字',
				byteRangeLength:'长度在5-10'
			},
			repassword:{
				required:'请确认密码',
				isSameP:'两次密码不一致'
			}
		},
		focusInvalid: false,
		onkeyup: false,
		errorPlacement:function(error,element){
			error.appendTo(element.parent());
		}
	});
});	
</script>
</head>
<body id="lg_body">
<div id="lg_wrap">
<div id="ln_header">
			<div class="header_logo_bg">
				<div class="header_link"> 
						<a target="_blank" href="http://www.changdajx.cn/%E8%81%94%E7%B3%BB%E6%88%91%E4%BB%AC/"
						class="help_icon">问题咨询</a>&nbsp;&nbsp; 
						<a target="_blank"
						href="http://www.changdajx.cn"
						class="home_icon">驾校首页</a>&nbsp;&nbsp;
				</div>
			</div>
		</div>
		<div class="main_link" style="width:960px;margin-top:3px;">
			<a href="/jxgl/login"><b>首页</b></a> &gt; <font color="#666666">修改个人信息</font>
		</div>
		<div id="ln_main" style="height:590px;width:960px;">
			<div id="left-column">
                <div class="widget-alt">
                    <div class="headline no-margin"><h4>个人工具箱</h4></div>
                        <ul class="links-list-alt" style="padding-left:0px">
                            <li><a href="/jxgl/student/showme">修改个人信息</a></li>
                            <li><a href="/jxgl/changePic.jsp">修改头像</a></li>
                            <li><a href="/jxgl/student/editPwd">登录密码</a></li>
                            <li><a href="/jxgl/student/listdriver">选择教练</a></li>
                            <li><a href="/jxgl/logout">退出登录</a></li>
                        </ul>
                </div>
            </div>
            <div id="center-column">
            <div class="headline no-margin"><h4>修改个人信息</h4></div>
        <s:if test="msg != null">
            <div class="notification success closeable" id="notification_1" style="display: block;">
			<p><span>提示!</span> <s:property value="msg"/></p></div>
		</s:if>
				<form action="/jxgl/student/editPwdBack" method="POST" id="submitForm">
             		<div class="user_login_table" style="height:570px;width:100%">
                    	<div class="password">
                            <div class="login_name">
                                新密码:
                            </div>
                            <div>
                                <input type="password" tabindex="2" class="input_box" id="pwd" name="pwd">                                
                            </div>                            
                        </div>
                        <div class="password">
                            <div class="login_name">
                                密码确认:
                            </div>
                            <div>
                                <input type="password" tabindex="2" class="input_box" id="repassword" name="repassword">                                
                            </div>                            
                        </div>
                        <div class="login_btn">                        	
							<input name="register" type="submit" value="确认" class="login_btn_style">
						</div>           
					</div>
				</form>
			</div>

        </div>
</div>
</body>
</html>